package com.work.framework.pojo;

import java.io.Serializable;

/**
 * @author Administrator
 * @title: ResultDTO
 * @projectName mashangpai
 * @description: TODO
 * @date 2019/9/1217:25
 */
public class ResultDTO implements Serializable {
    public static final Integer SUCCESS = 200;
    public static final Integer Fail = 500;
    /**
     * 状态码
     * 返回状态 成功200   错误500
     */
    private int code;

    /**
     * 描述信息
     */
    private String message;

    /**
     * 返回数据
     */
    private Object data;

    /**
     * 分页用
     */
    private long tatol;

    /**
     * 重构
     * @param code
     * @param msg
     */
    public ResultDTO(int code, String msg) {
        this.code=code;
        this.message=msg;
    }

    /**
     * 重构
     */
    public ResultDTO(){

    }

    /**
     * 重构
     * @param code
     * @param message
     * @param data
     */
    public ResultDTO(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ResultDTO(int code,String message,Object data,long tatol){
        this.code = code;
        this.message = message;
        this.data = data;
        this.tatol = tatol;
    }

    @Override
    public String toString() {
        return "ResultDTO{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                ", tatol=" + tatol +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public long getTatol() {
        return tatol;
    }

    public void setTatol(long tatol) {
        this.tatol = tatol;
    }
}